<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
          <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
          	  <%@ page import="java.text.SimpleDateFormat" %>
<%
	java.lang.String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<body>
         		<form class="form-horizontal"  method="post" id="myform" name="myform" enctype="multipart/form-data" action="<%=path%>/admin/editor.do" >
 				<input type="hidden" name="user_id" value="${obj.user_id } " />
					<table border= "1" width= "100%" class="user-infomation-table">
					<tr>
				        <td colspan="4" style="background-color: #516984;line-height: 2;color: #fff;padding-left: 15px;">
							用户
				        </td>
				     </tr>
				   <tr>
						<td  width="10%">姓名</td>
						<td colspan="3" width="90%">
							<input type="text"  name="user_name" id="Teacher_name"   value="${obj.user_name }" />
						</td>
				     </tr>
				     
				    <%--  <tr>
						<td  width="10%">电话</td>
						<td colspan="3" width="90%">
							<input type="text"  name="user_tel" id="Teacher_name"   value="${obj.user_tel }" />
						</td>
				     </tr> --%>
						<tr>
							<td  width="10%">email</td>
							<td colspan="3" width="90%">
								<input type="text"  name="user_email" id="Teacher_name"   value="${obj.user_email }" />
							</td>
					     </tr>
				     
				     
				     
				     <tr>
						<td  width="10%">职务</td>
						<td colspan="3" width="90%">
							<input type="text"  name="user_identityCount" id="Teacher_name"   value="${obj.user_identityCount }" />
						</td>
				     </tr>
					
				    
				   <%--   <tr>
						<td width="10%">附件</td>
						<td colspan="3" width="70%">
							<input type="file" name="upload1"  value="" /> <a id="filistAdd" href="javascript:void()">[增加]</a>
							<div id="fjlist">
							</div>
						</td>
				     </tr>
				     <tr>
						<td width="10%">附件列表</td>
						<td colspan="3" width="70%">
							<c:forEach items="${fjlist }"  var="v">
								<span>
									<a target="_blank" href="/accessory/${v.Accessory_url}">${v.Accessory_name}</a>
									<a data-aid="${obj.abroad_id }" data-bid="${v.id}" style="color:red;" class="fjRemove" href="javascript:void()">[移除]</a>
									<br>
								</span>
							</c:forEach>
						</td>
				     </tr>
				      --%>
				     
				  
				     
				     <tr>
				     	<td colspan="4" style="text-align:center">
				     		<button class="preservation"  nc_date=" ${list.teacher_number }">保存</button>
				     	</td>
				     </tr>
				</table>
				</form>
</body>
<script>
$(function(){
	
	//添加上传
	$('#filistAdd').click(function(){
		$('#fjlist').append('<input type="file" name="upload1"  value="" /><br>');
	});
	
	//移除
	$('.fjRemove').click(function(){
		var _this=$(this);
		var aid=$(this).attr('data-aid');
		var bid=$(this).attr('data-bid');
		
   		$.post('<%=path%>/abroad/fjDel.do', 
   				{'abroad_id':aid,'fjid':bid},
   				
   				function(data){
   				
		   			if(data.code=='0'){
		   				
		   				_this.parent().remove();
		   			}else{
		   				alert(data.msg);
		   			}
   				}
   		);
		
		
	});
	
	$('.content-part-right').on('click','.preservation',function(e){
			e.preventDefault();
			$('#myform').submit();
		}
		//var teacher_number=$(this).attr('nc_date');
   		
   	});
	}
)
</script>
</html>